file = open('D:/Code/LesPage/txt/word.txt', 'r', encoding='UTF-8')
output = open('D:/Code/LesPage/txt/output.txt', 'a+', encoding='UTF-8')

result = ''
# nameNum = 1
# item = '<el-collapse-item title="{0}" name="{1}">\n'
# itemEnd = '</el-collapse-item>\n'

# for line in file.readlines():
#     if line[0] != '\t':
#         result += itemEnd
#         result += item.format(line[:-1], nameNum)
#         nameNum += 1
#     else:
#         result += line[1:]
#     pass

# result = result[20:] + itemEnd

item = '{word:\"{0}\"},'

for line in file.readlines():
    

output.write(result)
